<template>
  <div>
    <h1 @click="say()">{{msg}}</h1>
  </div>
</template>

<script>
export default {
  setup() {
    console.log('我是setup')
    console.log(this)
    const msg = '你好天才'
    const say = () => {
      console.log(msg)
    }
    return {
      msg,
      say
    }
  },
  // vue2 生命周期最早的
  beforeCreate() {
    console.log('我是beforeCreate')
    console.log(this)
  }
}
</script>